<?php 

# $pattern = '/^[a-zA-Z0-9]+[._-]?[a-zA-Z0-9]*@[a-zA-Z0-9.-]+.[a-zA-Z]{2,4}/';
$pattern = '/^[^\W][a-zA-Z0-9_]+(\.[a-zA-Z0-9_]+)*\@[a-zA-Z0-9_]+(\.[a-zA-Z0-9_]+)*\.[a-zA-Z]{2,4}$/';
# $pattern = '/^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/';
// $subject = 'yyuan2102@m.scnu.edu.cn';
// $subject = 'gxy_zjnu_jiaoyu@zjnu.edu.cn';
$subject = 'asdasd.cn@gmail.com';
var_dump(preg_match($pattern, $subject));

